import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

/* 基础布局组件 */ 
import Layout from "@/layout/index.vue"

const routes:RouteRecordRaw[] = [
    {
        path:'/login',
        name:'Login',
        component:()=> import('@/views/Login/index.vue'),
        meta: { hidden: true, title: '登录' },
    },
    {
        path: '/',
        name: 'Layout',
        component: Layout,
        redirect: '/user',
        children: [
          {
            path: 'user',
            name: 'user',
            component: () => import('@/views/Users/index.vue'),
            meta: { title: '用户查询', icon: 'search' },
          },
        ],
      },
]

export default createRouter({
    history:createWebHistory(),
    routes
})